Skip to main content

mobileStoreRestorePurchases

Type

command

Summary

Instruct the store to re-send notifications of previously completed purchases.

Syntax

mobileStoreRestorePurchases

Description

Use the mobileStoreRestorePurchases command to restore previously completed purchases

The command mobileStoreRestorePurchases is used to restore previously completed purchases. What it does is to instruct the store to re-send notifications of previously completed purchases. If the request is successful, then a purchaseStateUpdate message is returned, with pState = "restored"

note

Before calling this command, call mobileStoreEnablePurchaseUpdates to enable communication with the store via purchaseStateUpdate messages.

note

This command would typically be called the first time an app is run after installation on a new device.This restores any items bought through the app.

note

Consumable products cannot be restored, except when interacting with the Google Play Store in-app purchasing API, where consumables are treated exactly the same way as non-consumables.

note

For iOS, non-renewing subscriptions cannot be restored, due to technical restrictions imposed by Apple. This means that developers are responsible for restoring non-renewing subscriptions and making them available across all devices the users own.

Examples

if tDeviceFirstRun is true then
mobileStoreEnablePurchaseUpdates
mobileStoreRestorePurchases
end if

command: mobileStoreRequestProductDetails, mobileStoreDisablePurchaseUpdates, mobileStoreEnablePurchaseUpdates, mobileStoreMakePurchase, mobileStoreSetProductType, mobileStoreConsumePurchase, mobileStoreConfirmPurchase, mobileStoreVerifyPurchase

function: mobileStoreProductProperty, mobileStorePurchasedProducts, mobileStorePurchaseError, mobileStoreCanMakePurchase

message: purchaseStateUpdate, productRequestError, productDetailsReceived

Compatibility and Support

Introduced

LiveCode 6.7

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?